package com.grupobbva.seguridad.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the TABLA_DETALLE database table.
 * 
 */
@Embeddable
public class TablaDetallePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="TABLA_ID")
	private String tablaId;

	@Column(name="DETALLE_ID")
	private String detalleId;

    public TablaDetallePK() {
    }
	public String getTablaId() {
		return this.tablaId;
	}
	public void setTablaId(String tablaId) {
		this.tablaId = tablaId;
	}
	public String getDetalleId() {
		return this.detalleId;
	}
	public void setDetalleId(String detalleId) {
		this.detalleId = detalleId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TablaDetallePK)) {
			return false;
		}
		TablaDetallePK castOther = (TablaDetallePK)other;
		return 
			this.tablaId.equals(castOther.tablaId)
			&& this.detalleId.equals(castOther.detalleId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.tablaId.hashCode();
		hash = hash * prime + this.detalleId.hashCode();
		
		return hash;
    }
}